
// src/router/index.ts文件内容
// createWebHistory 没有#
// createMemoryHistory 没有#  不显示后面
// createWebHashHistory 有个#
import { createRouter, Router, createWebHashHistory } from 'vue-router';

const routers = [
    // {
    //     name: 'index',
    //     path: '/',
    //     component: () => import('@/views/index.vue')
    // },

    {
        name: 'index',
        path: '/',
        components: {
            pc: import('@/views/pc/index.vue'),
            m: import('@/views/m/index.vue')
        }
    },
    {
        name: 'login',
        path: '/login',
        components: {
            pc: import('@/views/pc/index.vue'),
            m: import('@/views/m/login.vue')
        }
    },



];

const router: Router = createRouter({
    history: createWebHashHistory(),
    routes: routers
});

export default router;